package free.order.security.dao;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Session;

import free.order.common.dao.BaseDao;
import free.order.security.entity.User;

/**
 * 
 * @author stan zhang
 *
 */
public class UserDao extends BaseDao<User>
{
    private static final Log log = LogFactory.getLog(UserDao.class);

    public UserDao(){
    	super(User.class);
    }
    
    public List<User> findAll(User user)
    {
        try
        {	
            return super.getAll();
        }
        catch(RuntimeException re)
        {
            if (log.isErrorEnabled())
            {
                log.error("UserDao.findAll(User) failed", re);
            }

            throw re;
        }
    }

    public void delete(User user)
    {
        super.remove(user);
    }
    
}
